define(["jquery","bbcare",
	 "fu/app/comm/attention","fu/app/question/question.ui","fu/app/question/question.event",
	 'bch/app/vaccine/vaccineInoculationAdd.ui','bch/app/vaccine/vaccineInoculationAdd.servers'],function($,$bb,$attention,$questionUi,$questionEvent,$ui,$servers){
	var vaccineInoculationAdd = {};

	vaccineInoculationAdd.init = function(){
		var params = $bb.getPageParams();
		$ui.info({
			"id":"inoculationAddInfo",
			"data":params.info
		});
		var questiones = $servers.getQuestiones();
        $questionUi.init({
            "id":"InoculationAddForm",
            "status":"default",
            "list":questiones,
        });
        $questionEvent.init();
        $attention.init();
        // 暂时的，后期要加题型
        $("select[name=vaccineInoculationAdd001]").unbind("change");
        $("select[name=vaccineInoculationAdd001]").change(function(){
        	var monthAge = $(this).val();
        	var vaccine = $servers.vaccineType(monthAge);
        	var h = "";
        	for (var i = 0; i < vaccine.length; i++) {
        		h += '<option value="'+vaccine[i]+'">'+vaccine[i]+'</option>';
        	}
        	$("select[name=vaccineInoculationAdd002]").html(h);
        });
        $("#submitBtn").unbind("click");
        $("#submitBtn").click(function(){
        	$bb.openPage("bch_vaccineInoculation");
        });
	}

	return vaccineInoculationAdd;
});